/**
 * Copyright 2023 Inc.
 **/
package com.myz.springclond2021.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * @author maoyz0621 on 2023/9/15
 * @version v1.0
 */
@Component
@RefreshScope
@Data
public class NacosValueConfig {

    @Value("${config.main.value:mao}")
    private String mainVal;

    @Value("${config.address:安徽}")
    private String val;

    // 此属性值多文件都存在
    @Value("${config.common:haha}")
    private String common;

    @Value("${mysql.host:127.0.0.1}")
    private String host;

    @Value("${redis.port:6379}")
    private int port;
}